<p class="text-right doc-link">Table <a target="_blank" ng-href="{{ wikiLink }}item_enchantment_template"><span class="glyphicon glyphicon-link" aria-henchden="true"></span>item_enchantment_template</a></p>
<br>
<div class="row">
  <div class="col-xs-offset-1 col-xs-2">
    <small>ench</small>
    <input class="form-control input-xs" type="text" ng-model="selected.ench">
  </div>
  <div class="col-xs-2">
    <small>chance</small>
    <input class="form-control input-xs" type="text" ng-model="selected.chance">
  </div>
</div>
<div class="row">
  <div class="col-xs-4">
    <br>
    <button class="btn btn-danger" ng-click="deleteSelectedRowFrom(new_item_enchantment_template)"><i class="glyphicon glyphicon-remove"></i> Delete</button>
    <button class="btn btn-success" ng-click="addRowTo(new_item_enchantment_template, 'ench')"><i class="glyphicon glyphicon-plus"></i> Add new</button>
  </div>
  <div class="col-xs-2 pull-right">
    <br>
    <button class="btn btn-primary pull-right" ng-click="openFullScriptModal(new_item_enchantment_template, 'item_enchantment_template', 'entry')">FULL Loot Script</button>
  </div>
  <div class="col-xs-2 pull-right">
    <br>
    <button class="btn btn-success pull-right" ng-click="openDiffScriptModal('item_enchantment_template', 'entry', 'ench', current_item_enchantment_template, new_item_enchantment_template)">DIFF Loot Script</button>
  </div>
</div>
<div class="row">
  <div class="col-xs-3 col-xs-offset-1">
    <br>
    <table class="table table-striped table-condensed" style="max-wenchth: 160px">
      <thead>
        <th class="text-center"></th>
        <th class="text-center">ench</th>
        <th class="text-center">chance</th>
      </thead>
      <tr ng-repeat="creature in new_item_enchantment_template track by $index" ng-click="selectRow(new_item_enchantment_template, $index)" ng-class="{'tr-selected': $index == selectedRow}" ench="{{ $index }}">
        <td><i class="glyphicon glyphicon-edit pointer" ng-click="selectRow(new_item_enchantment_template, $index)"></i></td>
        <td>{{ creature.ench }}</td>
        <td>{{ creature.chance }}</td>
      </tr>
    </table>
  </div>
</div>
